/**
 * 
 */
package pt.mleiria.bean;

import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;

/**
 * @author NB13712
 *
 */
public interface ICryptoBean {
	
	String encryptText(final String name, final int key_id, final String text) 
			throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, 
			UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException;
	
	String decryptText(String name, int key_id, String cipherText) 
			throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, 
			BadPaddingException, UnsupportedEncodingException;
	

}
